#include<string>

class Solution {
public:
    std::string modifyString(std::string s) {
        if (s[0] == '?') {
            for (char a = 'a'; a < 'z'; a++) {
                if (a != s[1]) {
                    s[0] = a;
                }
            }
        }
        for (int i = 0; i < s.size(); i++) {
            if (i > 0 && s[i] == '?') {
                for (char a = 'a'; a < 'z'; a++) {
                    if (a != s[i - 1] && a != s[i + 1]) {
                        s[i] = a;
                    }
                }
            }
        }
        return s;
    }
};